package com.itheima.pattern.singleton.demo1;


/**
 * 饿汉式：静态成员变量
 */
public class Singleton {
    // 1.私有化构造方法
    private Singleton() {}

    private static Singleton instance = new Singleton();

    public static Singleton getInstance() {
        return instance;
    }

}
